import zmq
context = zmq.Context.instance()
sock = context.socket(zmq.REP)
sock.connect('tcp://localhost:8001')

while True:
  msg = sock.recv()
  # print "msg: ",msg
  res = "pp"+msg+"zz"
  sock.send(res)
  # print 'sendd'
